<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Module templel_scan</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>

<h1>Module templel_scan</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>a scanner for the Templerl expression language.


<h2><a name="description">Description</a></h2>a scanner for the Templerl expression language
 
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#done-5">done/5*</a></td><td>finish the scanning process.</td></tr>
<tr><td valign="top"><a href="#main_scan-7">main_scan/7*</a></td><td>the actual scan loop.</td></tr>
<tr><td valign="top"><a href="#read_hex-1">read_hex/1*</a></td><td></td></tr>
<tr><td valign="top"><a href="#reserved_word-1">reserved_word/1*</a></td><td>check if a word is reserved.</td></tr>
<tr><td valign="top"><a href="#scan-7">scan/7</a></td><td>top-level of scan.</td></tr>
<tr><td valign="top"><a href="#scan_comment-7">scan_comment/7*</a></td><td>scan for a comment.</td></tr>
<tr><td valign="top"><a href="#scan_name-7">scan_name/7*</a></td><td>scan for a name
       begin-with ::= [a-zA-Z], char ::= [a-zA-Z] | number | '_'.</td></tr>
<tr><td valign="top"><a href="#scan_number-7">scan_number/7*</a></td><td>scan numbers.</td></tr>
<tr><td valign="top"><a href="#scan_rec-7">scan_rec/7*</a></td><td>an interface for tail-recursive call.</td></tr>
<tr><td valign="top"><a href="#scan_string-7">scan_string/7*</a></td><td>scan for a string.</td></tr>
<tr><td valign="top"><a href="#string-2">string/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#sub_scan_delim-7">sub_scan_delim/7*</a></td><td>scan for a delimiter.</td></tr>
<tr><td valign="top"><a href="#sub_scan_escape-7">sub_scan_escape/7*</a></td><td>scan for a character escape sequence, in string.</td></tr>
</table>

<h2><a name="functions">Function Details</a></h2>

<h3 class="function"><a name="done-5">done/5 *</a></h3>
<div class="spec">
<p><tt>done(Cs, Errors, Toks, Pos, X5) -&gt; any()</tt></p>
</div><p><p>finish the scanning process</p>
 
  String</p>

<h3 class="function"><a name="main_scan-7">main_scan/7 *</a></h3>
<div class="spec">
<p><tt>main_scan(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p>the actual scan loop.
       stack is assumed to be []
 </p>

<h3 class="function"><a name="read_hex-1">read_hex/1 *</a></h3>
<div class="spec">
<p><tt>read_hex(H) -&gt; any()</tt></p>
</div>

<h3 class="function"><a name="reserved_word-1">reserved_word/1 *</a></h3>
<div class="spec">
<p><tt>reserved_word(X1::atom()) -&gt; bool()</tt></p>
</div><p>check if a word is reserved
 </p>

<h3 class="function"><a name="scan-7">scan/7</a></h3>
<div class="spec">
<p><tt>scan(Cs::<a href="#type-stream">stream()</a>, Stack::<a href="#type-stack">stack()</a>, Toks::[<a href="#type-tok">tok()</a>], Pos::<a href="#type-pos">pos()</a>, State::<a href="#type-state">state()</a>, Errors::<a href="#type-errors">errors()</a>, Delim::string()) -&gt; <a href="#type-result">result()</a></tt></p>
</div><p>top-level of scan
 </p>

<h3 class="function"><a name="scan_comment-7">scan_comment/7 *</a></h3>
<div class="spec">
<p><tt>scan_comment(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p>scan for a comment
 </p>

<h3 class="function"><a name="scan_name-7">scan_name/7 *</a></h3>
<div class="spec">
<p><tt>scan_name(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p>scan for a name
       begin-with ::= [a-zA-Z], char ::= [a-zA-Z] | number | '_'
 </p>

<h3 class="function"><a name="scan_number-7">scan_number/7 *</a></h3>
<div class="spec">
<p><tt>scan_number(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p>scan numbers
 </p>

<h3 class="function"><a name="scan_rec-7">scan_rec/7 *</a></h3>
<div class="spec">
<p><tt>scan_rec(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p>an interface for tail-recursive call
 </p>

<h3 class="function"><a name="scan_string-7">scan_string/7 *</a></h3>
<div class="spec">
<p><tt>scan_string(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p>scan for a string
 </p>

<h3 class="function"><a name="string-2">string/2</a></h3>
<div class="spec">
<p><tt>string(Cs::[char()], Pos::integer()) -&gt; <a href="#type-scan_result">scan_result()</a></tt></p>
</div>

<h3 class="function"><a name="sub_scan_delim-7">sub_scan_delim/7 *</a></h3>
<div class="spec">
<p><tt>sub_scan_delim(Cs, Stack, Toks, Pos, State, Errors, DCs) -&gt; any()</tt></p>
</div><p>scan for a delimiter
 </p>

<h3 class="function"><a name="sub_scan_escape-7">sub_scan_escape/7 *</a></h3>
<div class="spec">
<p><tt>sub_scan_escape(Cs, Stack, Toks, Pos, State, Errors, Delim) -&gt; any()</tt></p>
</div><p><p>scan for a character escape sequence, in string.       
a string is a syntactical sugar list (e.g "abc")</p>
 
  \X - escape sequences</p>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Jun 4 2009, 03:01:55.</i></p>
</body>
</html>
